package mapper;

import org.apache.ibatis.annotations.Param;
import pojo.Brand;

import java.util.List;
import java.util.Map;

public interface BrandMapper {

    List<Brand> selectAll();//查询所有数据

    Brand selectById(int id);//查询id

    List<Brand> selectByCondition(@Param("status")int status, @Param("companyName")String companyName, @Param("brandName")String brandName);

    List<Brand> selectByCondition(Brand brand);

    List<Brand> selectByCondition(Map map);

    /*
    * 单条件动态查询
    * @param brand
    * @return
    */
    List<Brand> selectByConditionSingle(Brand brand);

    /*添加*/
    int addBrand(Brand brand);

    /*修改*/
    int updateBrand(Brand brand);
}

